﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using E4D.AppFabric.Entities;

namespace MDCAdminTool.Logger
{
    [Export]
    public class ListBoxLogger : ListBox , ILogger
    {
        #region ILogger Members

        void ILogger.Add(object item )
        {
            this.Dispatcher.Invoke(
                new Action(() => { Items.Add(item); this.ScrollIntoView(item); }));
        }

        System.Collections.IList ILogger.Items
        {
            get
            {
                return Items;
            }
        }

        #endregion
    }
}
